import request from '/@/utils/request';

// 查询考勤组列表
export function listGroup(query?: Object) {
  return request({
    url: '/module/attendance/group/list',
    method: 'get',
    params: query
  })
}

// 查询考勤组详细
export function getGroup(id?: number) {
  return request({
    url: '/module/attendance/group/' + id,
    method: 'get'
  })
}

// 新增考勤组
export function addGroup(data?: Object) {
  return request({
    url: '/module/attendance/group',
    method: 'post',
    data: data
  })
}

// 修改考勤组
export function updateGroup(data?: Object) {
  return request({
    url: '/module/attendance/group',
    method: 'put',
    data: data
  })
}

// 删除考勤组
export function delGroup(id?: number) {
  return request({
    url: '/module/attendance/group/' + id,
    method: 'delete'
  })
}

// 导出考勤组
export function exportGroup(query?: Object) {
  return request({
    url: '/module/attendance/group/export',
    method: 'get',
    params: query
  })
}
